"use client";

import dynamic from "next/dynamic";
import { Suspense } from "react";

import { SettingsDialog } from "~/app/settings/dialogs/settings-dialog";

const Main = dynamic(() => import("./main"), {
  ssr: false,
  loading: () => (
    <div className="flex h-full w-full flex-1 items-center justify-center">
      页面加载中 ...
    </div>
  ),
});

export default function GenericChat() {
  return (
    <div className="flex h-screen w-full flex-col justify-center overscroll-none px-4">
      <div className="flex h-12 items-center justify-end">
        <Suspense>
          <SettingsDialog />
        </Suspense>
      </div>
      <div className="flex-1 overflow-hidden">
        <Main />
      </div>
      <div className="text-muted-foreground flex flex-col items-center justify-center py-4 text-xs">
        <p>Copyright © {new Date().getFullYear()} Vora 炫涡智能</p>
      </div>
    </div>
  );
}
